********************************************************************************
// Data_processing.do: In this do-file the merging of different data sources will be operated.

// Individual-level dataset: EVS/WVS
// Contextual datasets: 1) Comparative Political Dataset
//						2) KOF Globalisation index
//						3) Comparative Manifesto Project
//						4) Global state of democracy dataset 

// The inclusion criteria for the sample are:
	// 		1) Contexts had populist parties running for elections or EVS/WVS country-year fieldwork provides data on voting intentions/party preference for populist parties
	//		2) Contextual data linked to the EVS/WVS fieldworks need to be available 

// The dependent variable is a dichotomous variable (populist voting intention: 0 voting intention for another party 1 populist party voting intention)
// Reference to the definition of populism proposed by Canovan (1999, 2002, 2004), and that has been followed in similar ways by other scholars (e.g. Mudde, 2004; Stanley, 2008)
// Given the variety of contexts, the coding relies on the source "The PopuList" (https://popu-list.org/) to ensure the widest possible scholarly agreement on the definition of political parties as populist
// Populist parties are considered as all the political parties coded as "Populist" by the list. See the url for more information regarding the definition adopted. 

// For each context, the populist parties as coded as the category 1, and all the remaining parties as the category 0. 
// Voting intentions/party preferences labelled as Other parties, null votes, blank votes, or where voting indication was not clear (e.g., some contexts reported voting intentions for multiple parties in one category) have been coded as missing
	
// The main independent variable at the individual level is Political distrust, operationalised with the EVS/WVS items on confidence in Institutions
// Selected as institutions connected with the theory of the paper the Parliament (E069_07), Government (E069_11), Political Parties (E069_12)
// Expected an high correlation between the three items, and if confirmed we aim to build an index of Political distrust to include more nuances. 

// 10/07/2024

capture log close 

clear all 
macro drop _all
set linesize 120

* After downloading all the content of the data package folder, specify here the folder where all data are. 
cd "C:\Users\franc\Desktop\POSTDOC_MILANO_STATALE\PROJECTS\ONGOING\CANOVAN_RESEARCH_NOTE\IPSR_DATAVERSE"  // specify the path

log using "Data_Processing", replace text

*Loading the EVS/WVS Integrated dataset 1981-2017. 
use Integrated_values_surveys_1981-2021.dta, clear

*Keeping only countries under study
keep if inlist(S003, 40, 56, 100, 191, 196, 203, 208, 233, 246, 250, 276, ///
	300, 348, 372, 380, 440, 442, 528, 578, 616, 642, 703, 705, 724, ///
	752, 756, 826, 428)

*Keeping only contexts where populist parties are in competition
keep if inlist(S025, 401990, 401999, 402008, 402018, 561981, 561990, 561999, 562009, ///
	1001997, 1001999, 1002006, 1002008, 1002017, 1912008, 1912017, ///
	2031998, 2031999, 2032008, 2032017, 2081981, 2081990, 2081999, 2082008, ///
	2082017, 2331999, 2332008, 2332011, 2332018, 2461996, 2462000, 2462005, 2462009, ///
	2462017, 2501981, 2501990, 2501999, 2502006, 2502008, 2502018, 2761997, 2761999, ///
	2762006, 2762008, 2762013, 2762017, 2762018, 3001999, 3002008, 3002017, 3481998, ///
	3481999, 3482008, 3482009, 3482018, 3721981, 3721990, 3721999, 3722008, 3801981, ///
	3801990, 3801999, 3802005, 3802009, 3802018, 4281999, 4282008, 4401997, 4401999, ///
	4402008, 4402018, 4421999, 4422008, 5281981, 5281990, 5281999, 5282006, 5282008, ///
	5282012, 5282017, 5781982, 5781990, 5781996, 5782007, 5782008, 5782018, 6161997, ///
	6161999, 6162005, 6162008, 6162012, 6162017, 6421998, 6421999, 6422005, ///
	6422008, 6422012, 6422018, 7031998, 7031999, 7032008, 7032017, 7051995, 7051999, ///
	7052005, 7052008, 7052011, 7052017, 7242017, 7521996, 7521999, 7522006, 7522009, ///
	7522011, 7522017, 7561989, 7561996, 7562007, 7562008, 7562017, 8261999, ///
	8262005, 8262009, 8262018)

*Dropping contexts without populist parties data // Contexts have been double-checked in the do-file "dependent variable"
drop if inlist(S025, 561981, 2331999, 2332008, 2332011, 2501981, 2502006, 2502008,  ///
					2762006, 3721981, 3801981, 3801990, 3802005, 4281999, 4282008,  ///
					5281981, 5282006, 5781982, 6161997, 6161999, 7521996, 7521999,  ///
					7522006, 7522009, 7561989, 8262005, 8262009)
sort S025					
					
save analysis_dataset.dta, replace

********************************************************************************
*Loading the Comparative Political Dataset / Data are lagged of one year previous than the EVS/WVS fieldworks 
use CPDS_1960-2019_Update_2021.dta, clear
fre iso3n

*Creating the variable for merging (S025 to match the EVS/WVS survey-years) 
gen S025=.
*Austria: 4 contexts
replace S025=401990 if iso3n==40 & year==1989
replace S025=401999 if iso3n==40 & year==1998
replace S025=402008 if iso3n==40 & year==2007
replace S025=402018 if iso3n==40 & year==2017
*Belgium: 3 contexts
replace S025=561990 if iso3n==56 & year==1989
replace S025=561999 if iso3n==56 & year==1998
replace S025=562009 if iso3n==56 & year==2008
*Bulgaria: 5 contexts
replace S025=1001997 if iso3n==100 & year==1996
replace S025=1001999 if iso3n==100 & year==1998
replace S025=1002006 if iso3n==100 & year==2005
replace S025=1002008 if iso3n==100 & year==2007
replace S025=1002017 if iso3n==100 & year==2016
*Croatia: 2 contexts
replace S025=1912008 if iso3n==191 & year==2007
replace S025=1912017 if iso3n==191 & year==2016
*Czech Republic: 4 contexts
replace S025=2031998 if iso3n==203 & year==1996
replace S025=2031999 if iso3n==203 & year==1998
replace S025=2032008 if iso3n==203 & year==2005
replace S025=2032017 if iso3n==203 & year==2016
*Denmark: 5 contexts
replace S025=2081981 if iso3n==208 & year==1980
replace S025=2081990 if iso3n==208 & year==1989
replace S025=2081999 if iso3n==208 & year==1998
replace S025=2082008 if iso3n==208 & year==2007
replace S025=2082017 if iso3n==208 & year==2016
*Estonia: 1 context
replace S025=2332018 if iso3n==233 & year==2017
*Finland: 5 contexts
replace S025=2461996 if iso3n==246 & year==1995
replace S025=2462000 if iso3n==246 & year==1999
replace S025=2462005 if iso3n==246 & year==2004
replace S025=2462009 if iso3n==246 & year==2008
replace S025=2462017 if iso3n==246 & year==2016
*France: 3 contexts 
replace S025=2501990 if iso3n==250 & year==1989
replace S025=2501999 if iso3n==250 & year==1998
replace S025=2502018 if iso3n==250 & year==2017
*Germany: 6 contexts
replace S025=2761997 if iso3n==276 & year==1996
replace S025=2761999 if iso3n==276 & year==1998
replace S025=2762008 if iso3n==276 & year==2007
replace S025=2762013 if iso3n==276 & year==2012
replace S025=2762017 if iso3n==276 & year==2016
replace S025=2762018 if iso3n==276 & year==2017
*Greece: 3 contexts 
replace S025=3001999 if iso3n==300 & year==1998
replace S025=3002008 if iso3n==300 & year==2007
replace S025=3002017 if iso3n==300 & year==2016
*Hungary: 5 contexts
replace S025=3481998 if iso3n==348 & year==1997
replace S025=3481999 if iso3n==348 & year==1998
replace S025=3482008 if iso3n==348 & year==2007
replace S025=3482009 if iso3n==348 & year==2008
replace S025=3482018 if iso3n==348 & year==2017
*Ireland: 3 contexts
replace S025=3721990 if iso3n==372 & year==1989
replace S025=3721999 if iso3n==372 & year==1998
replace S025=3722008 if iso3n==372 & year==2007
*Italy: 3 contexts
replace S025=3801999 if iso3n==380 & year==1998
replace S025=3802009 if iso3n==380 & year==2008
replace S025=3802018 if iso3n==380 & year==2017
*Lithuania: 4 contexts
replace S025=4401997 if iso3n==440 & year==1996
replace S025=4401999 if iso3n==440 & year==1998
replace S025=4402008 if iso3n==440 & year==2007
replace S025=4402018 if iso3n==440 & year==2017
*Luxembourg: 2 contexts 
replace S025=4421999 if iso3n==442 & year==1998
replace S025=4422008 if iso3n==442 & year==2007
*Netherlands: 5 contexts  
replace S025=5281990 if iso3n==528 & year==1989
replace S025=5281999 if iso3n==528 & year==1998
replace S025=5282008 if iso3n==528 & year==2007
replace S025=5282012 if iso3n==528 & year==2011
replace S025=5282017 if iso3n==528 & year==2016
*Norway: 5 contexts
replace S025=5781990 if iso3n==578 & year==1989
replace S025=5781996 if iso3n==578 & year==1995
replace S025=5782007 if iso3n==578 & year==2006
replace S025=5782008 if iso3n==578 & year==2007
replace S025=5782018 if iso3n==578 & year==2017
*Poland: 4 contexts 
replace S025=6162005 if iso3n==616 & year==2004
replace S025=6162008 if iso3n==616 & year==2007
replace S025=6162012 if iso3n==616 & year==2011
replace S025=6162017 if iso3n==616 & year==2016
*Romania: 6 contexts
replace S025=6421998 if iso3n==642 & year==1997
replace S025=6421999 if iso3n==642 & year==1998
replace S025=6422005 if iso3n==642 & year==2004
replace S025=6422008 if iso3n==642 & year==2007
replace S025=6422012 if iso3n==642 & year==2011
replace S025=6422018 if iso3n==642 & year==2017
*Slovakia: 4 contexts
replace S025=7031998 if iso3n==703 & year==1997
replace S025=7031999 if iso3n==703 & year==1998
replace S025=7032008 if iso3n==703 & year==2007
replace S025=7032017 if iso3n==703 & year==2016
*Slovenia: 6 contexts
replace S025=7051995 if iso3n==705 & year==1994
replace S025=7051999 if iso3n==705 & year==1998
replace S025=7052005 if iso3n==705 & year==2004
replace S025=7052008 if iso3n==705 & year==2007
replace S025=7052011 if iso3n==705 & year==2010
replace S025=7052017 if iso3n==705 & year==2016
*Spain: 1 context
replace S025=7242017 if iso3n==724 & year==2016
*Sweden: 2 contexts 
replace S025=7522011 if iso3n==752 & year==2010
replace S025=7522017 if iso3n==752 & year==2016
*Switzerland: 4 contexts  
replace S025=7561996 if iso3n==756 & year==1995
replace S025=7562007 if iso3n==756 & year==2006
replace S025=7562008 if iso3n==756 & year==2007
replace S025=7562017 if iso3n==756 & year==2016
*Great Britian: 2 contexts  
replace S025=8261999 if iso3n==826 & year==1998
replace S025=8262018 if iso3n==826 & year==2017

*Keeping the sample correspondent to the EVS/WVS fieldworks // excluding contexts that won't be part of the analysis.
drop if S025==.
sort S025
save comparative_political_dataset.dta, replace

*Merging Comparative Political Dataset and EVS/WVS data 
use analysis_dataset.dta, clear
merge m:m S025 using comparative_political_dataset.dta

fre S025
drop _merge

save analysis_dataset.dta, replace

********************************************************************************
*Loading the KOF Globalisation index dataset / Data are lagged of one year previous than the EVS/WVS fieldworks 
use KOFGI_2021_public.dta, clear

encode country, gen(cntry)
fre cntry

*Creating the key variable for merging 
gen S025=.
*Austria
replace S025=401990 if cntry==11 & year==1989
replace S025=401999 if cntry==11 & year==1998
replace S025=402008 if cntry==11 & year==2007
replace S025=402018 if cntry==11 & year==2017
*Belgium
replace S025=561990 if cntry==18 & year==1989
replace S025=561999 if cntry==18 & year==1998
replace S025=562009 if cntry==18 & year==2008
*Bulgaria 
replace S025=1001997 if cntry==28 & year==1996
replace S025=1001999 if cntry==28 & year==1998
replace S025=1002006 if cntry==28 & year==2005
replace S025=1002008 if cntry==28 & year==2007
replace S025=1002017 if cntry==28 & year==2016
*Croatia
replace S025=1912008 if cntry==46 & year==2007
replace S025=1912017 if cntry==46 & year==2016
*Czech Republic
replace S025=2031998 if cntry==49 & year==1996
replace S025=2031999 if cntry==49 & year==1998
replace S025=2032008 if cntry==49 & year==2005
replace S025=2032017 if cntry==49 & year==2016
*Denmark
replace S025=2081981 if cntry==50 & year==1980
replace S025=2081990 if cntry==50 & year==1989
replace S025=2081999 if cntry==50 & year==1998
replace S025=2082008 if cntry==50 & year==2007
replace S025=2082017 if cntry==50 & year==2016
*Estonia
replace S025=2332018 if cntry==60 & year==2017
*Finland 
replace S025=2461996 if cntry==66 & year==1995
replace S025=2462000 if cntry==66 & year==1999
replace S025=2462005 if cntry==66 & year==2004
replace S025=2462009 if cntry==66 & year==2008
replace S025=2462017 if cntry==66 & year==2016
*France
replace S025=2501990 if cntry==67 & year==1989
replace S025=2501999 if cntry==67 & year==1998
replace S025=2502018 if cntry==67 & year==2017
*Germany 
replace S025=2761997 if cntry==72 & year==1996
replace S025=2761999 if cntry==72 & year==1998
replace S025=2762008 if cntry==72 & year==2007
replace S025=2762013 if cntry==72 & year==2012
replace S025=2762017 if cntry==72 & year==2016
replace S025=2762018 if cntry==72 & year==2017
*Greece
replace S025=3001999 if cntry==74 & year==1998
replace S025=3002008 if cntry==74 & year==2007
replace S025=3002017 if cntry==74 & year==2016
*Hungary 
replace S025=3481998 if cntry==86 & year==1997
replace S025=3481999 if cntry==86 & year==1998
replace S025=3482008 if cntry==86 & year==2007
replace S025=3482009 if cntry==86 & year==2008
replace S025=3482018 if cntry==86 & year==2017
*Ireland 
replace S025=3721990 if cntry==92 & year==1989
replace S025=3721999 if cntry==92 & year==1998
replace S025=3722008 if cntry==92 & year==2007
*Italy 
replace S025=3801999 if cntry==94 & year==1998
replace S025=3802009 if cntry==94 & year==2008
replace S025=3802018 if cntry==94 & year==2017
*Lithuania 
replace S025=4401997 if cntry==113 & year==1996
replace S025=4401999 if cntry==113 & year==1998
replace S025=4402008 if cntry==113 & year==2007
replace S025=4402018 if cntry==113 & year==2017
*Luxembourg 
replace S025=4421999 if cntry==116 & year==1998
replace S025=4422008 if cntry==116 & year==2007
*Netherlands 
replace S025=5281990 if cntry==139 & year==1989
replace S025=5281999 if cntry==139 & year==1998
replace S025=5282008 if cntry==139 & year==2007
replace S025=5282012 if cntry==139 & year==2011
replace S025=5282017 if cntry==139 & year==2016
*Norway
replace S025=5781990 if cntry==147 & year==1989
replace S025=5781996 if cntry==147 & year==1995
replace S025=5782007 if cntry==147 & year==2006
replace S025=5782008 if cntry==147 & year==2007
replace S025=5782018 if cntry==147 & year==2017
*Poland 
replace S025=6162005 if cntry==156 & year==2004
replace S025=6162008 if cntry==156 & year==2007
replace S025=6162012 if cntry==156 & year==2011
replace S025=6162017 if cntry==156 & year==2016
*Romania
replace S025=6421998 if cntry==160 & year==1997
replace S025=6421999 if cntry==160 & year==1998
replace S025=6422005 if cntry==160 & year==2004
replace S025=6422008 if cntry==160 & year==2007
replace S025=6422012 if cntry==160 & year==2011
replace S025=6422018 if cntry==160 & year==2017
*Slovakia
replace S025=7031998 if cntry==172 & year==1997
replace S025=7031999 if cntry==172 & year==1998
replace S025=7032008 if cntry==172 & year==2007
replace S025=7032017 if cntry==172 & year==2016
*Slovenia
replace S025=7051995 if cntry==173 & year==1994
replace S025=7051999 if cntry==173 & year==1998
replace S025=7052005 if cntry==173 & year==2004
replace S025=7052008 if cntry==173 & year==2007
replace S025=7052011 if cntry==173 & year==2010
replace S025=7052017 if cntry==173 & year==2016
*Spain
replace S025=7242017 if cntry==178 & year==2016
*Sweden
replace S025=7522011 if cntry==186 & year==2010
replace S025=7522017 if cntry==186 & year==2016
*Switzerland 
replace S025=7561996 if cntry==187 & year==1995
replace S025=7562007 if cntry==187 & year==2006
replace S025=7562008 if cntry==187 & year==2007
replace S025=7562017 if cntry==187 & year==2016
*Great Britian 
replace S025=8261999 if cntry==202 & year==1998
replace S025=8262018 if cntry==202 & year==2017

*Keeping the sample correspondent to the EVS/WVS fieldworks 
drop if S025==.
sort S025
save KOF_dataset.dta, replace

*Merging the KOF dataset with the Evs/Wvs+CPD dataset 
*Merging Comparative Political Dataset and EVS/WVS data 
use analysis_dataset.dta, clear
merge m:m S025 using KOF_dataset.dta

fre S025
drop _merge

save analysis_dataset.dta, replace

*Including the Checks on Government variable (C_a3) from the Global Democracy dataset 
* We need to include the variable manually as the original variable in the dataset can't be coded as numeric
gen checks=.
*Austria
replace checks=0.821345879 if S025==401990
replace checks=0.812833344 if S025==401999
replace checks=0.81940209 if S025==402008
replace checks=0.816608044 if S025==402018
*Belgium
replace checks=0.77692293 if S025==561990 
replace checks=0.812771213 if S025==561999
replace checks=0.823421731 if S025==562009
*Bulgaria 
replace checks=0.717608591 if S025==1001997
replace checks=0.716946416 if S025==1001999
replace checks=0.699335183 if S025==1002006
replace checks=0.698871315 if S025==1002008
replace checks=0.646766959 if S025==1002017
*Croatia
replace checks=0.651307593  if S025==1912008
replace checks=0.68388865 if S025==1912017
*Czech Republic
replace checks=0.829139021 if S025==2031998
replace checks=0.827986767 if S025==2031999
replace checks=0.835892934 if S025==2032008
replace checks=0.737398955 if S025==2032017
*Denmark
replace checks=0.987543643 if S025==2081981
replace checks=0.991352836 if S025==2081990
replace checks=0.99332333 if S025==2081999
replace checks=0.987586407 if S025==2082008
replace checks=0.992267859 if S025==2082017
*Estonia
replace checks=0.898806902 if S025==2332018
*Finland 
replace checks=0.918455017 if S025==2461996
replace checks=0.921668801 if S025==2462000
replace checks=0.923238121 if S025==2462005
replace checks=0.92249697 if S025==2462009
replace checks=0.905787151 if S025==2462017
*France
replace checks=0.784611421 if S025==2501990
replace checks=0.785556493 if S025==2501999
replace checks=0.831962921 if S025==2502018
*Germany 
replace checks=0.998865292 if S025==2761997
replace checks=0.995576644 if S025==2761999
replace checks=0.997307064 if S025==2762008
replace checks=0.997363852 if S025==2762013
replace checks=0.996680576 if S025==2762017
replace checks=0.974567113 if S025==2762018
*Greece
replace checks=0.755818441 if S025==3001999
replace checks=0.765089956  if S025==3002008
replace checks=0.701128823 if S025==3002017
*Hungary 
replace checks=0.728495456 if S025==3481998
replace checks=0.728488587 if S025==3481999
replace checks=0.752701991 if S025==3482008
replace checks=0.753201914 if S025==3482009
replace checks=0.554282992 if S025==3482018
*Ireland 
replace checks=0.809543743 if S025==3721990
replace checks=0.833238367  if S025==3721999
replace checks=0.837406707 if S025==3722008
*Italy 
replace checks=0.785583913 if S025==3801999
replace checks=0.754225129 if S025==3802009
replace checks=0.798323947 if S025==3802018
*Lithuania 
replace checks=0.804132491 if S025==4401997
replace checks=0.824001262 if S025==4401999
replace checks=0.827744767 if S025==4402008
replace checks=0.884823049 if S025==4402018
*Luxembourg 
replace checks=0.784935684 if S025==4421999
replace checks=0.780365268 if S025==4422008
*Netherlands 
replace checks=0.884499416 if S025==5281990
replace checks=0.868032265 if S025==5281999
replace checks=0.865327553 if S025==5282008
replace checks=0.912760263 if S025==5282012
replace checks=0.912238242 if S025==5282017
*Norway
replace checks=0.906038604 if S025==5781990
replace checks=0.951757168 if S025==5781996
replace checks=0.979306257 if S025==5782007
replace checks=0.980062687 if S025==5782008
replace checks=0.982144732 if S025==5782018
*Poland 
replace checks=0.822243964 if S025==6162005
replace checks=0.804730909 if S025==6162008
replace checks=0.837120371 if S025==6162012
replace checks=0.632369384 if S025==6162017
*Romania
replace checks=0.584644791 if S025==6421998
replace checks=0.584102239 if S025==6421999
replace checks=0.564972126 if S025==6422005
replace checks=0.631640349 if S025==6422008
replace checks=0.656577042 if S025==6422012
replace checks=0.594576742  if S025==6422018
*Slovakia
replace checks=0.584382848 if S025==7031998
replace checks=0.664144669 if S025==7031999
replace checks=0.734497753 if S025==7032008
replace checks=0.729599104  if S025==7032017
*Slovenia
replace checks=0.775323861 if S025==7051995
replace checks=0.755474852 if S025==7051999
replace checks=0.738450239 if S025==7052005
replace checks=0.740020188 if S025==7052008
replace checks=0.815322461 if S025==7052011
replace checks=0.81213907 if S025==7052017
*Spain
replace checks=0.744462581 if S025==7242017
*Sweden
replace checks=0.925031618 if S025==7522011
replace checks=0.950587249 if S025==7522017
*Switzerland 
replace checks=0.889688353 if S025==7561996
replace checks=0.887765327 if S025==7562007
replace checks=0.88522972 if S025==7562008
replace checks=0.889348205 if S025==7562017
*Great Britian 
replace checks=0.8343365 if S025==8261999
replace checks=0.830994981 if S025==8262018

*Multiplying checks on government index *100 to facilitate interpretation of results 
fre checks
gen b_checks=checks*100
fre b_checks

* Saving the composite dataset
save analysis_dataset.dta, replace

*Coding the dependent variable: Populist party preference
*Source for coding: https://popu-list.org/
gen populist=.
lab define populist 1"Populist party preference" 0"Other parrty preference"
lab var populist "Populist party preference"
lab val populist populist 
fre populist

*Coding the dependent variable: Right-wing populist preference 
gen rwp=.
lab define rwp 1"Right-wing Populist party preference" 0"Other parrty preference"
lab var rwp "Populist party preference"
lab val rwp rwp 
fre rwp

*Coding the dependent variable: Left-wing populist preference 
gen lwp=.
lab define lwp 1"Left-wing Populist party preference" 0"Other parrty preference"
lab var lwp "Populist party preference"
lab val lwp lwp 
fre lwp

*Voting intentions variables: WVS/EVS surveys collected the political preference variable in different ways throughout the wsurvey waves.
// In the 2nd, 3rd, and 4th EVS wave, the question asked was "Which party would you vote if there were elections tomorrow?"
// In the 1st and 5th EVS waves, the question asked was Which party appeals you the most?
// All the WVS surveys asked as question "Which party would you vote if there were elections tomorrow?"
// Aware of the slight difference between the two question-wording, all the political preference variables are harmonised into one variable measuring respondents' voting intention, as for the purposes of our analysis we are interested in their political behaviour under a certain institutional context 

// Missing the values indicating whether the respondent did not vote, would not vote, would cast a blank vote, would vote no party (None), and Other are set as missing before proceeding with the coding. 
*EVS: Which party would you vote if there were elections tomorrow? (except 1st and 5th wave)
tab E179 S002EVS, m
tab E179 S001, m
fre E179
replace E179=. if inlist(E179, 1, 2, 3, 4, 5) 
*EVS: Which party appeals you the most? (1st and 5th wave)
tab E181A S002EVS, m
tab E181A S001, m
fre E181A
replace E181A=. if inlist(E181A, 4, 5)
*WVS: Which party would you vote if there were elections tomorrow?
tab E179WVS S002, m
tab E179WVS S001, m
fre E179WVS
replace E179WVS=. if inlist(E179WVS, 1, 2, 3, 4, 5, 7)


// For each country, political preferences collected by the WVS/EVS fieldworks are examined and the political parties coded as indicated above. 
*Austria
fre E179 if S003==40
replace populist=1 if inlist(E179, 40003, 40008, 40009)
replace rwp=1 if inlist(E179, 40003, 40008)
replace E179=. if inlist(E179, 40012)
fre E181A if S003==40
replace populist=1 if inlist(E181A, 40003)
replace rwp=1 if inlist(E181A, 40003)
replace E181A=. if inlist(E181A, 40013, 40012)
fre E179WVS if S003==40 

*Belgium
fre E179 if S003==56
replace populist=1 if inlist(E179, 56005, 56031, 56033, 56033)
replace rwp=1 if inlist(E179, 56005, 56031)
fre E181A if S003==56  
fre E179WVS if S003==56 

*Bulgaria
fre E179 if S003==100
replace populist=1 if inlist(E179, 100005, 100010, 100028, 100019, 100038)
replace rwp=1 if inlist(E179, 100028, 100038)
fre E181A if S003==100  
replace populist=1 if inlist(E181A, 100041, 100040, 100038, 100019)
replace rwp=1 if inlist(E181A, 100041, 100040, 100038)
fre E179WVS if S003==100
replace populist=1 if inlist(E179WVS, 100005, 100010, 100018, 100019)
replace rwp=1 if inlist(E179WVS, 100018)

*Croatia
fre E179 if S003==191
replace populist=1 if inlist(E179, 191025)
replace rwp=1 if inlist(E179, 191025)
fre E181A if S003==191  
replace populist=1 if inlist(E181A, 191025, 191036, 191037, 191011)
replace rwp=1 if inlist(E181A, 191025, 191011)
replace E181A=. if inlist(E181A, 191038)
fre E179WVS if S003==191 

*Czech Republic
fre E179 if S003==203 
replace populist=1 if inlist(E179, 203084, 203011, 203071)
replace rwp=1 if inlist(E179, 203011, 203071)
fre E181A if S003==203  
replace populist=1 if inlist(E181A, 203077, 203079, 203084)
replace rwp=1 if inlist(E181A, 203077, 203079)
replace E181A=. if inlist(E181A, 203085, 203086)
fre E179WVS if S003==203 
replace populist=1 if inlist(E179WVS, 203011)
replace rwp=1 if inlist(E179WVS, 203011)

*Denmark // Blank votes not coded as missing 
fre E179 if S003==208 
replace populist=1 if inlist(E179, 208006, 208009)
replace rwp=1 if inlist(E179, 208006, 208009)
replace E179=. if inlist(E179, 208025)
fre E181A if S003==208  
replace populist=1 if inlist(E181A, 208006, 208022, 208026)
replace rwp=1 if inlist(E181A, 208006, 208022, 208026)
fre E179WVS if S003==208 

*Estonia
fre E179 if S003==233  
fre E181A if S003==233  
replace populist=1 if inlist(E181A, 233037)
replace rwp=1 if inlist(E181A, 233037)
replace E181A=. if inlist(E181A, 233039, 233040)
fre E179WVS if S003==233  

*Finland 
fre E179 if S003==246 
replace populist=1 if inlist(E179, 246008)
replace rwp=1 if inlist(E179, 246008)
replace E179=. if inlist(E179, 246023)
fre E181A if S003==246  
replace populist=1 if inlist(E181A, 246008)
replace rwp=1 if inlist(E181A, 246008)
replace E181A=. if inlist(E181A, 246023, 246024)
fre E179WVS if S003==246 
replace populist=1 if inlist(E179WVS, 246008)
replace rwp=1 if inlist(E179WVS, 246008)


*France
fre E179 if S003==250 
replace populist=1 if inlist(E179, 250009, 250010, 250014)
replace rwp=1 if inlist(E179, 250009, 250010, 250014)
replace E179=. if inlist(E179, 250034, 250035)
fre E181A if S003==250  
replace populist=1 if inlist(E181A, 250014, 250027, 250032)
replace rwp=1 if inlist(E181A, 250014,  250032)
replace lwp=1 if inlist(E181A, 250027)
replace E181A=. if inlist(E181A, 250035, 250036)
fre E179WVS if S003==250  

*Germany 
fre E179 if S003==276 
replace populist=1 if inlist(E179, 276011, 276005)
replace rwp=1 if inlist(E179, 276011)
replace lwp=1 if inlist(E179, 276005)
replace E179=. if inlist(E179, 276032)
fre E181A if S003==276  
replace populist=1 if inlist(E181A, 276030, 276031)
replace rwp=1 if inlist(E181A, 276031)
replace lwp=1 if inlist(E181A, 276030)
replace E181A=. if inlist(E181A, 276032)
fre E179WVS if S003==276 
replace populist=1 if inlist(E179WVS, 276034, 276033, 276011)
replace rwp=1 if inlist(E179WVS, 276033, 276011)
replace lwp=1 if inlist(E179WVS, 276034)

*Greece
fre E179 if S003==300 
replace populist=1 if inlist(E179, 300004, 300005, 300007, 300008)
replace rwp=1 if inlist(E179, 300008)
replace lwp=1 if inlist(E179, 300004, 300005, 300007)
replace E179=. if inlist(E179, 300009)
fre E181A if S003==300  
fre E179WVS if S003==300 
replace populist=1 if inlist(E179WVS, 300101, 300110)
replace lwp=1 if inlist(E179WVS, 300110)

*Hungary
fre E179 if S003==348 
replace populist=1 if inlist(E179, 348004, 348007, 348018)
replace rwp=1 if inlist(E179, 348004, 348007, 348018)
fre E181A if S003==348  
replace populist=1 if inlist(E181A, 348019, 348020)
replace rwp=1 if inlist(E181A, 348019, 348020)
replace E181A=. if inlist(E181A, 348030, 348029)
fre E179WVS if S003==348 
replace populist=1 if inlist(E179WVS, 348004, 348007)
replace rwp=1 if inlist(E179WVS, 348004, 348007)

*Ireland 
fre E179 if S003==372 
replace populist=1 if inlist(E179, 372005)
replace lwp=1 if inlist(E179, 372005)
replace E179=. if inlist(E179, 372010)
fre E181A if S003==372  
fre E179WVS if S003==372 

*Italy
fre E179 if S003==380  
replace populist=1 if inlist(E179, 380004, 380006, 380035)
replace rwp=1 if inlist(E179, 380006)
fre E181A if S003==380   
replace populist=1 if inlist(E181A, 380004, 380006, 380046, 380048)
replace rwp=1 if inlist(E181A, 380006, 380048)
replace E181A=. if inlist(E181A, 380051, 380052)
fre E179WVS if S003==380   

*Lithuania 
fre E179 if S003==440  
replace populist=1 if inlist(E179, 440065, 440006, 440017)
replace rwp=1 if inlist(E179, 440006)
replace lwp=1 if inlist(E179, 440017)
replace E179=. if inlist(E179, 440076)
fre E181A if S003==440   
replace populist=1 if inlist(E181A, 440065, 440060, 440068)
replace E181A=. if inlist(E181A, 440077, 440076)
fre E179WVS if S003==440  
replace populist=1 if inlist(E179WVS, 440006)
replace rwp=1 if inlist(E179WVS, 440006)

*Luxembourg
fre E179 if S003==442  
replace populist=1 if inlist(E179, 442001)
replace E179=. if inlist(E179, 442009)
fre E181A if S003==442   
fre E179WVS if S003==442  

*Netherlands
fre E179 if S003==528  
replace populist=1 if inlist(E179, 528009, 528011, 528012, 528013)
replace rwp=1 if inlist(E179, 528011, 528012, 528013)
replace lwp=1 if inlist(E179, 528009)
replace E179=. if inlist(E179, 528024)
fre E181A if S003==528   
replace populist=1 if inlist(E181A, 528023, 528009, 528013)
replace rwp=1 if inlist(E181A, 528023, 528013)
replace lwp=1 if inlist(E181A, 528009)
replace E181A=. if inlist(E181A, 528024, 528025)
fre E179WVS if S003==528  
replace populist=1 if inlist(E179WVS, 528022, 528013)
replace rwp=1 if inlist(E179WVS, 528013)
replace lwp=1 if inlist(E179WVS, 528022)

*Norway
fre E179 if S003==578  
replace populist=1 if inlist(E179, 578002)
replace rwp=1 if inlist(E179, 578002)
replace E179=. if inlist(E179, 578031)
fre E181A if S003==578   
replace populist=1 if inlist(E181A, 578027, 578002)
replace rwp=1 if inlist(E181A, 578002)
replace E181A=. if inlist(E181A, 578031)
fre E179WVS if S003==578  
replace populist=1 if inlist(E179WVS, 578002)
replace rwp=1 if inlist(E179WVS, 578002)

*Poland 
fre E179 if S003==616  
replace populist=1 if inlist(E179, 616044, 616035, 616034, 616031)
replace rwp=1 if inlist(E179, 616044, 616035, 616031)
fre E181A if S003==616   
replace populist=1 if inlist(E181A, 616044, 616046)
replace rwp=1 if inlist(E181A, 616044, 616046)
replace E181A=. if inlist(E181A, 616052, 616053)
fre E179WVS if S003==616  
replace populist=1 if inlist(E179WVS, 616031, 616034, 616035)
replace rwp=1 if inlist(E179WVS, 616031, 616035)


*Romania
fre E179 if S003==642  
replace populist=1 if inlist(E179, 642009, 642007)
replace rwp=1 if inlist(E179, 642009, 642007)
replace E179=. if inlist(E179, 642044)
fre E181A if S003==642   
replace populist=1 if inlist(E181A, 642007)
replace rwp=1 if inlist(E181A, 642007)
replace E181A=. if inlist(E181A, 642044, 642045)
fre E179WVS if S003==642  
replace populist=1 if inlist(E179WVS, 642007, 642055, 642009)
replace rwp=1 if inlist(E179WVS, 642007, 642009)


*Slovakia
fre E179 if S003==703  
replace populist=1 if inlist(E179, 703042, 703038, 703006)
replace rwp=1 if inlist(E179, 703006)
fre E181A if S003==703   
replace populist=1 if inlist(E181A, 703048, 703049, 703045, 703006)
replace rwp=1 if inlist(E181A, 703048, 703006)
replace E181A=. if inlist(E181A, 703053)
fre E179WVS if S003==703  
replace populist=1 if inlist(E179WVS, 703006, 703014, 703010)
replace rwp=1 if inlist(E179WVS, 703006)
replace lwp=1 if inlist(E179WVS, 703014)


*Slovenia
fre E179 if S003==705  
replace populist=1 if inlist(E179, 705005, 705001)
replace rwp=1 if inlist(E179, 705005, 705001)
replace E179=. if inlist(E179, 705028)
fre E181A if S003==705   
replace populist=1 if inlist(E181A, 705001, 705005, 705024)
replace rwp=1 if inlist(E181A, 705001, 705005)
replace lwp=1 if inlist(E181A, 705024)
replace E181A=. if inlist(E181A, 705028)
fre E179WVS if S003==705  
replace populist=1 if inlist(E179WVS, 705005, 705006)
replace rwp=1 if inlist(E179WVS, 705005, 705006)


*Spain
fre E181A if S003==724   
replace populist=1 if inlist(E181A, 724105, 724106, 724107)
replace lwp=1 if inlist(E181A, 724105, 724106, 724107)
replace E181A=. if inlist(E181A, 724115, 724116)

*Sweden
fre E179 if S003==752  
fre E181A if S003==752   
replace populist=1 if inlist(E181A, 752008)
replace rwp=1 if inlist(E181A, 752008)
replace E181A=. if inlist(E181A, 752010)
fre E179WVS if S003==752  
replace populist=1 if inlist(E179WVS, 752009)
replace rwp=1 if inlist(E179WVS, 752009)

*Switzerland 
fre E179 if S003==756  
replace populist=1 if inlist(E179, 756004, 756037, 756036)
replace rwp=1 if inlist(E179, 756004, 756037)
replace E179=. if inlist(E179, 756048)
fre E181A if S003==756   
replace populist=1 if inlist(E181A, 756004, 756037, 756043, 756046)
replace rwp=1 if inlist(E181A, 756004, 756037, 756043)
replace E181A=. if inlist(E181A, 756048, 756049)
fre E179WVS if S003==756  
replace populist=1 if inlist(E179WVS, 756004, 756006, 756037)
replace rwp=1 if inlist(E179WVS, 756004, 756006, 756037)

*Great Britain
fre E179 if S003==826  
replace populist=1 if inlist(E179, 826008)
replace rwp=1 if inlist(E179, 826008)
replace E179=. if inlist(E179, 826016)
fre E181A if S003==826   
replace populist=1 if inlist(E181A, 826008)
replace rwp=1 if inlist(E181A, 826008)
replace E181A=. if inlist(E181A, 826016,  826017)
fre E179WVS if S003==826  

// Having completed the coding of populist parties and cleared the missing values, we code the remaining uncoded values as 0 "Other"
replace populist=0 if populist==.
tab populist, m
// 140,026 individuals: 11.19% of the sample shows a political preference for populist parties, the remaining 88.91% shows a political preference for another party. 



// As expected, we have much more availability for right-wing populist parties voters than for left-wing populists. 

save analysis_dataset.dta, replace

********************************************************************************
*Independent variables
*Sociodemographic variables
* Gender: 1 Male 2 Female
recode X001 (1=0 "Male") (2=1 "Female"), gen(gender)
lab val gender gender
fre gender

* Age: linear and squared
summarize X003, detail
rename X003 age
gen age2=age*age
fre age2

* Years spent in education 
rename X023 education
fre education

* Unemployment status: 1 Unemployed 0 Not Unemployed
rename X028 occupation
recode occupation (7=1 "Unemployed") (else=0 "Not Unemployed"), gen(unemployed)
fre unemployed

* Sociopolitical attitudes
* Political distrust index: composed by three items asking their confidence in three key political institutions
*Confidence in Parliament (4-point scale: 1 Great Deal 4 Not at all)
recode E069_07 (1=0 "A great Deal") (2=1 "Quite a lot") (3=2 "Not very much") (4=3 "Not at all"), gen(parliament)
*Confidence in Political parties (4-point scale: 1 Great Deal 4 Not at all)
tab E069_12, m
recode E069_12 (1=0 "A great Deal") (2=1 "Quite a lot") (3=2 "Not very much") (4=3 "Not at all"), gen(parties)
*Confidence in Government (4-point scale: 1 Great Deal 4 Not at all)
tab E069_11, m
recode E069_11 (1=0 "A great Deal") (2=1 "Quite a lot") (3=2 "Not very much") (4=3 "Not at all"), gen(government)

*Building composite indicator of political distrust (Renouncing to the first waves of EVS data)
// Control the correlation between the three items
pwcorr parliament government parties
// The items show a generally high correlation between each other (> 0.6)
* Performing a Factor Analysis with the three items 
factor parliament government parties, pcf
// One factor emerges clearly from the Eigenvalues analysis (76% of explained variance)
// The three items load similarly on the dimension detected. 
// The highest unexplained variance is showed by the Confidence in parties variable (.265)

* Analysis of the reliability 
alpha parliament government parties, item casewise gen(distrust) // .8418
// The Cronbach's Alpha shows a highly reliable indicator overall

* Social Trust: 1  Most people can be trusted  / 2  Can´t be too careful 
recode A165 (1 = 0 "Most people can be trusted") ( 2 = 1 "Can´t be too careful"), gen(soc_trust)
fre soc_trust

* Authoritarian attitudes: Political system: Having a strong leader
fre E114
recode E114 (1=0 "Very good") (2=1 "Fairly good") (3=2 "Fairly bad") (4=3 "Very bad"), gen(E114_1)
vreverse E114_1, gen(strong_leader)
fre strong_leader

* Contextual variables
* Lijphart's First Dimension Index: Executives-Parties Dimension (Comparative Political Dataset)
fre lfirstp

* KOF Economic Globalisation Index (KOF Globalisation index)
fre KOFEcGI

* KOF Political Globalisation Index (KOF Globalisation index)
fre KOFPoGI

* Checks on Government (Global state of democracy dataset)
fre b_checks

* GDP Growth (Comparative Political Dataset)
fre realgdpgr

* Unemployment rate (Comparative Political Dataset)
fre unemp

* Civilian employment in industry, (%) (Comparative Political Dataset)
gen ind_perc=(emp_ind/ttl_labf)*100
lab var ind_perc "% Employment in Industry"
fre ind_perc

* Social security transfers, % of GDP (Comparative Political Dataset)
fre sstran

* Preparing the analytical sample
reg populist distrust i.soc_trust strong_leader education i.gender age i.unemployed lfirstp
gen sample=1 if e(sample)  

* Drop missings to keep sample constant 
drop if sample!=1

* Centering variables
* Centring Years of Education
egen education_m=mean(education)
gen education_mc = education-education_m
tabstat education_mc

*Centering Respondents' years
egen age_m=mean(age)
gen age_mc = age-age_m
tabstat age_mc 
gen age_mc2=age_mc*age_mc

* KOF Economic Globalisation
egen eco_glob_m=mean(KOFEcGI)
gen eco_glob_mc = KOFEcGI-eco_glob_m
tabstat eco_glob_mc

* KOF Political Globalisation 
egen pol_glob_m=mean(KOFPoGI)
gen pol_glob_mc = KOFPoGI-pol_glob_m
tabstat pol_glob_mc

* Checks on Government
egen b_checks_m=mean(b_checks)
gen b_checks_mc = b_checks-b_checks_m
tabstat b_checks_mc

* Real GDP change 
egen realgdpgr_m=mean(realgdpgr)
gen realgdpgr_mc = realgdpgr-realgdpgr_m
tabstat realgdpgr_mc

* Unemployment rate 
egen unemp_m=mean(unemp)
gen unemp_mc = unemp-unemp_m
tabstat unemp_mc

* Civilian employment in industry, (%)
egen ind_perc_m=mean(ind_perc)
gen ind_perc_mc = ind_perc-ind_perc_m
tabstat ind_perc_mc

* Social security transfers, % of GDP
egen sstran_m=mean(sstran)
gen sstran_mc = sstran-sstran_m
tabstat sstran_mc

*Populist governments
// We consider the context with populist at government if the year before or the year of the survey has had at least one populist government in the cabinet
// When more governments within a survey, we consider the government with more days in office.
// We do not distinguish between different situations of government (e.g., Coalition partner, external support)

gen pop_gov=. 
lab define pop_gov 1"Populist party at government" 0"Populist not at government"
lab var pop_gov "Populist party government"
lab val pop_gov pop_gov 
fre pop_gov

*Austria
replace pop_gov=0 if iso3n==40 & year==1989
replace pop_gov=0 if iso3n==40 & year==1998
replace pop_gov=0 if iso3n==40 & year==2007
replace pop_gov=0 if iso3n==40 & year==2017
*Belgium
replace pop_gov=0 if iso3n==56 & year==1989
replace pop_gov=0 if iso3n==56 & year==1998
replace pop_gov=0 if iso3n==56 & year==2008
*Bulgaria 
replace pop_gov=0 if iso3n==100 & year==1996
replace pop_gov=0 if iso3n==100 & year==1998
replace pop_gov=1 if iso3n==100 & year==2005
replace pop_gov=1 if iso3n==100 & year==2007
replace pop_gov=1 if iso3n==100 & year==2016
*Croatia
replace pop_gov=0 if iso3n==191 & year==2007
replace pop_gov=1 if iso3n==191 & year==2016
*Czech Republic
replace pop_gov=0 if iso3n==203 & year==1996
replace pop_gov=0 if iso3n==203 & year==1998
replace pop_gov=0 if iso3n==203 & year==2005
replace pop_gov=1 if iso3n==203 & year==2016
*Denmark
replace pop_gov=0 if iso3n==208 & year==1980
replace pop_gov=0 if iso3n==208 & year==1989
replace pop_gov=0 if iso3n==208 & year==1998
replace pop_gov=0 if iso3n==208 & year==2007
replace pop_gov=0 if iso3n==208 & year==2016
*Estonia
replace pop_gov=0 if iso3n==233 & year==2017
*Finland 
replace pop_gov=0 if iso3n==246 & year==1995
replace pop_gov=0 if iso3n==246 & year==1999
replace pop_gov=0 if iso3n==246 & year==2004
replace pop_gov=0 if iso3n==246 & year==2008
replace pop_gov=1 if iso3n==246 & year==2016
*France
replace pop_gov=0 if iso3n==250 & year==1989
replace pop_gov=0 if iso3n==250 & year==1998
replace pop_gov=0 if iso3n==250 & year==2017
*Germany 
replace pop_gov=0 if iso3n==276 & year==1996
replace pop_gov=0 if iso3n==276 & year==1998
replace pop_gov=0 if iso3n==276 & year==2007
replace pop_gov=0 if iso3n==276 & year==2012
replace pop_gov=0 if iso3n==276 & year==2016
replace pop_gov=0 if iso3n==276 & year==2017
*Greece
replace pop_gov=0 if iso3n==300 & year==1998
replace pop_gov=0 if iso3n==300 & year==2007
replace pop_gov=1 if iso3n==300 & year==2016
*Hungary 
replace pop_gov=0 if iso3n==348 & year==1997
replace pop_gov=1 if iso3n==348 & year==1998 
replace pop_gov=0 if iso3n==348 & year==2007
replace pop_gov=0 if iso3n==348 & year==2008
replace pop_gov=1 if iso3n==348 & year==2017
*Ireland 
replace pop_gov=0 if iso3n==372 & year==1989
replace pop_gov=0 if iso3n==372 & year==1998
replace pop_gov=0 if iso3n==372 & year==2007
*Italy 
replace pop_gov=0 if iso3n==380 & year==1998
replace pop_gov=1 if iso3n==380 & year==2008
replace pop_gov=0 if iso3n==380 & year==2017
*Lithuania 
replace pop_gov=1 if iso3n==440 & year==1996
replace pop_gov=1 if iso3n==440 & year==1998
replace pop_gov=0 if iso3n==440 & year==2007
replace pop_gov=1 if iso3n==440 & year==2017
*Luxembourg 
replace pop_gov=0 if iso3n==442 & year==1998
replace pop_gov=0 if iso3n==442 & year==2007
*Netherlands 
replace pop_gov=0 if iso3n==528 & year==1989
replace pop_gov=0 if iso3n==528 & year==1998
replace pop_gov=0 if iso3n==528 & year==2007
replace pop_gov=0 if iso3n==528 & year==2011
replace pop_gov=0 if iso3n==528 & year==2016
*Norway
replace pop_gov=0 if iso3n==578 & year==1989
replace pop_gov=0 if iso3n==578 & year==1995
replace pop_gov=0 if iso3n==578 & year==2006
replace pop_gov=0 if iso3n==578 & year==2007
replace pop_gov=1 if iso3n==578 & year==2017
*Poland 
replace pop_gov=0 if iso3n==616 & year==2004
replace pop_gov=1 if iso3n==616 & year==2007
replace pop_gov=0 if iso3n==616 & year==2011
replace pop_gov=1 if iso3n==616 & year==2016
*Romania
replace pop_gov=0 if iso3n==642 & year==1997
replace pop_gov=0 if iso3n==642 & year==1998
replace pop_gov=0 if iso3n==642 & year==2004
replace pop_gov=0 if iso3n==642 & year==2007
replace pop_gov=0 if iso3n==642 & year==2011
replace pop_gov=0 if iso3n==642 & year==2017
*Slovakia
replace pop_gov=1 if iso3n==703 & year==1997
replace pop_gov=1 if iso3n==703 & year==1998
replace pop_gov=1 if iso3n==703 & year==2007
replace pop_gov=1 if iso3n==703 & year==2016
*Slovenia
replace pop_gov=0 if iso3n==705 & year==1994
replace pop_gov=0 if iso3n==705 & year==1998
replace pop_gov=1 if iso3n==705 & year==2004
replace pop_gov=1 if iso3n==705 & year==2007
replace pop_gov=0 if iso3n==705 & year==2010
replace pop_gov=0 if iso3n==705 & year==2016
*Spain
replace pop_gov=0 if iso3n==724 & year==2016
*Sweden
replace pop_gov=0 if iso3n==752 & year==2010
replace pop_gov=0 if iso3n==752 & year==2016
*Switzerland 
replace pop_gov=1 if iso3n==756 & year==1995
replace pop_gov=1 if iso3n==756 & year==2006
replace pop_gov=1 if iso3n==756 & year==2007
replace pop_gov=1 if iso3n==756 & year==2016
*Great Britian 
replace pop_gov=0 if iso3n==826 & year==1998
replace pop_gov=0 if iso3n==826 & year==2017

* Keeping only variables of interest for analysis 
keep populist rwp lwp distrust soc_trust strong_leader education_mc education gender age age_mc age_mc2 unemployed lfirstp pol_glob_mc eco_glob_mc b_checks_mc realgdpgr_mc unemp_mc ind_perc_mc sstran_mc S025 S003 KOFPoGI KOFEcGI b_checks S017 realgdpgr unemp ind_perc sstran S002EVS S002 S002VS S021 S024 S002vs S020 pop_gov G006 E069_18

********************************************************************************
save analysis_dataset.dta, replace


log close 




